clear all;close all

A = xlsread('PvsEb_theory_whistler_mode.xlsx');
B = xlsread('PvsEb_simulations_whistler_mode.xlsx');

figure
h=loglog(A(:,1),A(:,2),'b');set(h,'linewidth',2);hold on
h=loglog(A(:,1),A(:,3),'m--');set(h,'linewidth',2);
h=loglog(A(:,1),A(:,4),'g');set(h,'linewidth',2);
h=loglog(B(:,1),B(:,2),'.k');set(h,'markersize',20);

set(gca,'fontsize',20)
xlabel('E_b [keV]')
ylabel('$\bar{P}$','interpreter','latex')
axis square
axis([0.8 40 1e-11 1e-7])
title('Whistler-mode branch');
h=legend('Theory \alpha=0.01^\circ','Theory \alpha=0.001^\circ','Theory \alpha=0.001^\circ, finite size','SPS','location','Southwest');
set(h,'fontsize',17)
legend boxoff

C = xlsread('PvsEb_theory_X_mode.xlsx');
D = xlsread('PvsEb_simulations_X_mode.xlsx');

figure
h=loglog(C(:,1),C(:,2),'b');set(h,'linewidth',2);hold on
h=loglog(C(:,1),C(:,3),'m--');set(h,'linewidth',2);
h=loglog(C(:,1),C(:,4),'g');set(h,'linewidth',2);
h=loglog(D(:,1),D(:,2),'.k');set(h,'markersize',20);

set(gca,'fontsize',20)
xlabel('E_b [keV]')
ylabel('$\bar{P}$','interpreter','latex')
axis square
axis([0.8 200 1e-7 2e-5])
title('X-mode branch');